/**
 * Project: metacrumbs
 * File: McApplication.java
 * Type: McApplication
 * Author: unmarco
 * Created: Sep 5, 2011 11:26:44 AM
 */
package org.sensolab.metacrumbs.rest;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Router;
import org.restlet.routing.Template;

/**
 * @author unmarco
 *
 */
public class McApplication extends Application {

	/* (non-Javadoc)
	 * @see org.restlet.Application#createInboundRoot()
	 */
	@Override
	public Restlet createInboundRoot() {
		Router router = new Router(getContext());
		router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
		router.setDefaultMatchingQuery(false);
		router.attach("/metacrumbs/locations", LocationServerResource.class);
		router.attach("/metacrumbs/locations/{locationID}", LocationServerResource.class);
		return router;
	}
	
}
